Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 vector-feature-night-mode-enabled skin-theme-clientpref-os vector-sticky-header-enabled" lang="fr" dir="ltr"><head>
<meta charset="UTF-8">
<title>PL/pgSQL</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="../_res_/favicon.png">
<link rel="canonical" href="https://fr.wikipedia.org/wiki/PL%2FpgSQL"> <link href="../_mw_/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="../_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="../_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="../_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="../_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="../_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="../_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="../_res_/footer.css">
<link rel="stylesheet" type="text/css" href="../_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-PL_pgSQL rootpage-PL_pgSQL skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">PL/pgSQL</span></h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="fr" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="fr" dir="ltr"><div class="infobox_v3 infobox infobox--frwiki noarchive" style="width:260px">
<div class="entete icon informatique" style="color: #000000;"><style data-mw-deduplicate="TemplateStyles:r228712691">
/* start https://fr.wikipedia.org/ */


.mw-parser-output .entete.informatique{background-image:url("../_mw_/Picto.nfo.png")}


/* end https://fr.wikipedia.org/ */
</style>
<div>PL/pgSQL</div>
</div>
<div class="images">
</div>
<p class="mw-empty-elt">

</p>
<table><caption style="color:#000000;">Informations</caption>







<tbody><tr>
<th scope="row"> <a href="../Version_d'un_logiciel" title="Version d'un logiciel">Première version</a>
</th>
<td>
<span class="wd_p571"><time class="nowrap" datetime="1998-10-30" data-sort-value="1998-10-30">30 octobre 1998</time></span></td>
</tr>






























<tr>
<th scope="row"> Type
</th>
<td>
<span class="wd_p31">Langage procédural <small>(<a href="https://www.wikidata.org/wiki/Q28922885" class="extiw external" title="d:Q28922885"><span class="indicateur-langue" title="Voir l'élément Wikidata correspondant">d</span></a>)</small><br><a href="../Langage_d%C3%A9di%C3%A9" title="Langage dédié">Langage dédié</a></span></td>
</tr>



<tr>
<th scope="row"><a href="../Licence_de_logiciel" title="Licence de logiciel">Licence</a></th>
<td>
<span class="wd_p275">Licence PostgreSQL <small>(<a href="https://www.wikidata.org/wiki/Q18563589" class="extiw external" title="d:Q18563589"><span class="indicateur-langue" title="Voir l'élément Wikidata correspondant">d</span></a>)</small></span></td>
</tr>

<tr>
<th scope="row"><a href="../Documentation_logicielle" title="Documentation logicielle">Documentation</a></th>
<td>
<span class="wd_p2078"><a rel="nofollow" class="external text" href="https://www.postgresql.org/docs/current/plpgsql.html">www.postgresql.org/docs/current/plpgsql.html</a></span></td>
</tr>



</tbody></table>
<p class="mw-empty-elt">

</p>
</div>
<p><b>PL/pgSQL</b> (<i><b>Procedural Language/PostgreSQL Structured Query Language</b></i>) est un <a href="../Langage_proc%C3%A9dural" class="mw-redirect" title="Langage procédural">langage procédural</a> géré par <a href="../PostgreSQL" title="PostgreSQL">PostgreSQL</a>. Ce langage est très similaire au <a href="../PL/SQL" title="PL/SQL">PL/SQL</a> d'<a href="../Oracle_Database" title="Oracle Database">Oracle</a>, ce qui permet de porter des scripts de ou vers Oracle au prix de quelques adaptations<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>.
</p>

<div class="mw-heading mw-heading2"><h2 id="Différences_par_rapport_à_PL/SQL"><span id="Diff.C3.A9rences_par_rapport_.C3.A0_PL.2FSQL"></span>Différences par rapport à PL/SQL</h2></div>
<ul><li>La notion de paquetage de PL/SQL n'a pas d'équivalent dans PL/pgSQL.</li>
<li>La structure itérative <i>FOR</i> peut directement itérer sur le résultat d'une requête SQL.</li>
<li>Les arguments des procédures et fonctions ne peuvent pas prendre de valeurs par défaut, mais la surcharge de fonctions et de procédures est possible.</li>
<li>Les boucles <i>FOR</i> en <i>REVERSE</i> comptent à rebours à partir du premier chiffre donné jusqu'au deuxième et non du deuxième jusqu'au premier comme en PL/SQL.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Références"><span id="R.C3.A9f.C3.A9rences"></span>Références</h2></div>
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a> </span><span class="reference-text"><span class="ouvrage">«&nbsp;<a rel="nofollow" class="external text" href="https://docs.postgresql.fr/current/plpgsql-porting.html"><cite style="font-style:normal;">Portage d'Oracle PL/SQL</cite></a>&nbsp;»</span></span>
</li>
</ol></div>
<div class="mw-heading mw-heading2"><h2 id="Voir_aussi">Voir aussi</h2></div>
<style data-mw-deduplicate="TemplateStyles:r194021218">
/* start https://fr.wikipedia.org/ */


.mw-parser-output .autres-projets>.titre{text-align:center;margin:0.2em 0}.mw-parser-output .autres-projets>ul{margin:0;padding:0}.mw-parser-output .autres-projets>ul>li{list-style:none;margin:0.2em 0;text-indent:0;padding-left:24px;min-height:20px;text-align:left;display:block}.mw-parser-output .autres-projets>ul>li>a{font-style:italic}@media(max-width:720px){.mw-parser-output .autres-projets{float:none}}


/* end https://fr.wikipedia.org/ */
</style>
<div class="mw-heading mw-heading3"><h3 id="Articles_connexes">Articles connexes</h3></div>
<ul><li><a href="../Adaptive_Server_Enterprise" title="Adaptive Server Enterprise">Adaptive Server Enterprise</a> (Sybase)</li>
<li><a href="../PL/SQL" title="PL/SQL">PL/SQL</a> (Oracle)</li>
<li><a href="../Transact-SQL" title="Transact-SQL">Transact-SQL</a></li>
<li><a href="../Structured_Query_Language" title="Structured Query Language">SQL</a> (ANSI)</li>
<li><a href="../Microsoft_SQL_Server" title="Microsoft SQL Server">Microsoft SQL Server</a> (Microsoft)</li></ul>
<div class="mw-heading mw-heading3"><h3 id="Lien_externe">Lien externe</h3></div>
<ul><li><a rel="nofollow" class="external text" href="http://www.postgresql.org/docs/current/static/plpgsql.html">Documentation de PL/pgSQL</a></li></ul>
<ul id="bandeau-portail" class="bandeau-portail"><li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail des bases de données</span> </span></li> </ul></div><!--htdig_noindex--><div><div class="zim-footer">
Cet article est issu de <a class="external text" title="Dernière modification le 2024-01-11" href="https://fr.wikipedia.org/wiki/?title=PL%2FpgSQL&amp;oldid=211424727">Wikipédia</a>. Sauf mention contraire, le texte est disponible sous <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.fr">Creative Commons Attribution-Share Alike 4.0</a>. Des conditions supplémentaires peuvent s’appliquer aux fichiers multimédias.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="../_webp_/webpHandler.js"></script>

</body></html>